package com.yikes.srb.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.yikes.srb.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 数据字典
 * </p>
 *
 * @author guanrong.yin
 * @since 2024-12-03
 */
@Getter
@Setter
@TableName("dict")
@Schema(name = "Dict对象", description = "数据字典")
public class Dict extends BaseEntity implements Serializable {

    @Schema(description = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "上级id")
    @TableField("parent_id")
    private Long parentId;

    @Schema(description = "名称")
    @TableField("name")
    private String name;

    @Schema(description = "值")
    @TableField("value")
    private Integer value;

    @Schema(description = "编码")
    @TableField("dict_code")
    private String dictCode;

    @Schema(description = "是否包含子节点")
    @TableField(exist = false)
    private Boolean hasChildren;

}
